package com.itheima.service.impl;

import com.itheima.dao.AccountDao;
import com.itheima.entity.Account;
import com.itheima.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

/**
 *
 * 无论 controller Service Repository component value指明组件名字
 * 可以选择不写  默认值就是你的类名 首字母小写
 *
 * AccountServiceImpl-->accountServiceImpl
 * AccountServiceImpl2->accountServiceImpl2
 */
@Service("accountService")
public class AccountServiceImpl implements AccountService {
    @Autowired
    private AccountDao accountDao;

    @Override
    public void save(Account account) {
       System.out.println("AccountServiceImpl~~~~~~~~~~~保存用户信息成功："+account);
       accountDao.save(account);
    }
}